
import 'package:flutter/material.dart';

class UserInfo {
    late String name;
    late int age;
    UserInfo({required this.age,required this.name});

}


class UserInfoNotify extends ValueNotifier<UserInfo>{
    UserInfoNotify(UserInfo userInfo):super(userInfo);
    void setName(String name){
       value.name =  name;
       notifyListeners();
    }
}

UserInfoNotify userInfoNotify = UserInfoNotify(UserInfo(name:'fanjiantao',age: 12));

